import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:getwidget/getwidget.dart';
import 'package:meal/constant/sizes.dart';
import 'package:meal/route/route.dart';
import 'package:meal/ui/draw_under_line.dart';
import 'package:meal/utils/colors.dart';
import 'package:meal/utils/styles.dart';
import 'package:meal/utils/tools.dart';

class CategoryFinish extends StatefulWidget {
  const CategoryFinish({Key? key}) : super(key: key);

  @override
  State<CategoryFinish> createState() => _CategoryFinishState();
}

class _CategoryFinishState extends State<CategoryFinish> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        automaticallyImplyLeading: false,
        backgroundColor: Colors.transparent,
        elevation: 0,
        systemOverlayStyle: SystemUiOverlayStyle.dark,
      ),
      body: SingleChildScrollView(
        padding: const EdgeInsets.symmetric(horizontal: Sizes.default15),
        child: Column(
          children: [
            Container(
              alignment: Alignment.center,
              child: ToolsUtils.getUrlSvg(
                  'https://cdn7.axureshop.com/demo/1525603/images/提交成功/u714.svg',
                  width: Sizes.default80,
                  height: Sizes.default80),
            ),
            Container(
              margin: const EdgeInsets.only(top: Sizes.default15, bottom: Sizes.default30),
              alignment: Alignment.center,
              child: Text('提交成功',
                  style: StylesUtils.customTextStyle(
                      fontSize: Sizes.default25, color: ColorsUtils.color333)),
            ),
            SizedBox(
              height: 2,
              child: DrawUnderLine(
                color: ColorsUtils.rgba(121, 121, 121, 0.2),
                child: Container(),
              ),
            ),
            SizedBox(
              height: Sizes.default40,
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Text('店铺名称', style: StylesUtils.customTextStyle(color: ColorsUtils.color333, fontSize: Sizes.default15)),
                  Text('默林如斯的广东肠粉早餐店', style: StylesUtils.customTextStyle(color: ColorsUtils.color797, fontSize: Sizes.default15)),
                ],
              ),
            ),
            SizedBox(
              height: Sizes.default40,
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Text('负责人', style: StylesUtils.customTextStyle(color: ColorsUtils.color333, fontSize: Sizes.default15)),
                  Text('王晓琳', style: StylesUtils.customTextStyle(color: ColorsUtils.color797, fontSize: Sizes.default15)),
                ],
              ),
            ),
            SizedBox(
              height: Sizes.default40,
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Text('联系手机', style: StylesUtils.customTextStyle(color: ColorsUtils.color333, fontSize: Sizes.default15)),
                  Text('+86  1355849701', style: StylesUtils.customTextStyle(color: ColorsUtils.color797, fontSize: Sizes.default15)),
                ],
              ),
            ),
            SizedBox(
              height: 2,
              child: DrawUnderLine(
                color: ColorsUtils.rgba(121, 121, 121, 0.2),
                child: Container(),
              ),
            ),
            Container(
              margin: const EdgeInsets.only(top: Sizes.default50),
              alignment: Alignment.center,
              height: Sizes.default44,
              child: FractionallySizedBox(
                widthFactor: 0.8,
                child: GFButton(
                    onPressed: () {
                      // Get.offNamedUntil(RouteGet.home, (route) => route.settings.name == RouteGet.home);
                      Get.toNamed(RouteGet.categoryApply);
                    },
                    text: '完成',
                    textStyle: StylesUtils.customTextStyle(fontSize: Sizes.default16),
                    shape: GFButtonShape.pills,
                    type: GFButtonType.solid,
                    size: GFSize.LARGE,
                    color: ColorsUtils.parseColorFromHexString(ColorsUtils.colorFf6)),
              ),
            )
          ],
        ),
      ),
    );
  }
}
